//# sourceURL=http://uMapApp/Module/Bridge/BridgeFiles
define([
    "mhjs/mhjs",
    "uMap/uMap",
    "uEarth/uEarth",
    "../../UI/Layer"
], function (
    mhjs,
    uMap,
    uEarth,
    Layer
) {

    function BridgeFiles(option) {
        var _this = this;
        option && _this.OptionToProperties(option);

        _this.title = _this.title || _this.name;

        if (_this.fileFormat) {
            _this.file = _this.fileFormat.format(_this);
        } else {
            _this.file = _this.fileUrl || _this.fileURL;
        }

    }

    var _class = BridgeFiles;

    mhjs.OptionToPropertiesInterface(_class);
    mhjs.EventInterface(_class);

    Object.defineProperties(_class.prototype, {
        "openAttachment": {
            value: function (newWindow) {
                var _this = this;
                if (newWindow) {
                    window.open(_this.file, _this.num);
                } else if (_this.modalityWindow) {
                    _this.modalityWindow.open(_this.file, _this.title);
                }
            }
        }
    });

    return _class;

});